<script setup lang="ts">
import { RouterView } from 'vue-router'

import { useI18n } from 'vue-i18n'
import { locale } from '@/stores/i18n'
</script>

<template>
  <router-view v-slot="{ Component, route }">
    <el-config-provider :locale="locale[useI18n().locale.value]">
      <transition :name="String(route.meta.transition || '') || 'fade'" mode="out-in">
        <component :is="Component" />
      </transition>
    </el-config-provider>
  </router-view>
</template>

<style lang="scss" scoped></style>
